package com.sxit.tdf.server.entity.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author 胡乖乖童鞋
 * @date 2022/2/9 11:31
 * @describe
 */
@Schema(name = "CreatUserInfoVo", description = "接受新增的用户数据")
@Data
public class InsertUserInfoVo {

  private String id;

  @NotNull private int dept;

  @NotBlank
  @Pattern(
      regexp = "^([A-Za-z0-9_\\-\\.\\u4e00-\\u9fa5])+\\@([A-Za-z0-9_\\-\\.])+\\.([A-Za-z]{2,8})$",
      message = "请填写正确的邮箱")
  private String email;

  @NotBlank private String name;

  private String num;

  private int professional;
  @NotNull private int role;
  @NotNull private int statu;
  @NotNull private int sex;

  private boolean notification;

  @NotBlank
  @Pattern(regexp = "^(\\+?0?86\\-?)?1[3-9]\\d{9}$", message = "请填写正确的手机号")
  private String phone;
}
